/**
 * @author Patrick Bartylla
 * @version 1
 * @Date 21.05.2013
 */
public class FeatureVectorGenerator {

	private static DataManager dataManager = DataManager.getDataManagerInstance();

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception {
		System.out.println("Program Start");
		TextFileReader textReader = new TextFileReader();
		TextFileWriter textWriter = new TextFileWriter();
		
		//----------------------------------------------------------------------------------------------------------------------------------------------------
		/*
		 * Reading all Classifier 
		 */
		System.out.println("Reading Noises");
		textReader.NoisesDEUReader();
		System.out.println("Noises");
		//System.out.println(dataManager.getNoiseDeudata());
		
		
		//----------------------------------------------------------------------------------------------------------------------------------------------------
		/*
		 * Reading all Classifier 
		 */
		System.out.println("Reading Classes");
		textReader.ClassifierReader();
		//System.out.println("Classifier");
		//System.out.println(dataManager.getAllClasses());
		
		
		//----------------------------------------------------------------------------------------------------------------------------------------------------
		/*
		 * Reading Feature Vector 
		 */
		System.out.println("Reading Feature Vector");
		textReader.FeatureVectorReader();
		//System.out.println("Feature Vector");
		//System.out.println(dataManager.getFeatureWords());


		//----------------------------------------------------------------------------------------------------------------------------------------------------
		/*
		 * Reading ARFF 
		 */
		System.out.println("Reading ARFF");
		textReader.ReadingARFFFile();
		//System.out.println("ARFF");
		/*for(Object list : dataManager.getARFFdata())
		{
			System.out.println(list);			
		}
		*/
		
		
		//----------------------------------------------------------------------------------------------------------------------------------------------------
		/*
		 * Reading Training Data
		 */
		System.out.println("Reading Training Data");
		textReader.ReadingTrainData();
		System.out.println("Length: " + dataManager.getFeatureWords().size());
		//System.out.println("Trainingdata");
		/*for(Object list : dataManager.getARFFdata())
		{
			System.out.println(list);			
		}*/
		
		
		//----------------------------------------------------------------------------------------------------------------------------------------------------
		/*
		 * Output Training Data
		 */				
		System.out.println("Output Feature Vector");
		textWriter.WriteFeatureVector();
		
		System.out.println("Output ARFF");
		textWriter.WriteARFF();
		
		//----------------------------------------------------------------------------------------------------------------------------------------------------
		/*
		 * Deleting
		 */
		System.out.println("Deleting");
		dataManager.getARFFdata().clear();
		
		
		
		//----------------------------------------------------------------------------------------------------------------------------------------------------
		/*
		 * Question Data
		 */		
		System.out.println("Output Question");
		textReader.ReadingQuestions();
		//System.out.print(dataManager.getQuestionARFFdata());
		
		System.out.println("Output Question");
		textWriter.WriteQuestionARFF();
		
		
	}
}
